﻿@{
    ViewBag.Title = "RoleList";
}
<h2>角色列表</h2>
@Html.ActionLink("新建","Create")
<table>
    <thead>
        <tr>
            <th>
                角色
            </th>
            <th>
                用户数
            </th>
            <th>
                操作
            </th>
        </tr>
    </thead>
    @foreach (string role in ViewData["RoleList"] as string[]) { 
        <tbody>
            <tr>
                <td>
                    @role
                </td>
                <td>
                    @Roles.GetUsersInRole(role).Length
                </td>
                <td>
                    @Html.ActionLink("查看详细", "Index","KSPRole", new { roleName = @role}, null) 
                </td>
            </tr>
        </tbody>
    }
</table>
@Html.ActionLink("主页", "Index","KSP")